<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap.min.css" rel="stylesheet">
    </head>
    <body>
        <div class="container">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <h1 class="text-center ">
                        收欠款
                    </h1>


                    <h3 class="text-right text-success">
                        欢迎您:XXX
                        <#--<@shiro.principal property="name" />-->
                    </h3>


                    <form role="form" action="/debt/order-add" method="post">
                        <input type="hidden" name="did" value="${debt.did}">

                        <div class="col-md-6 column">
                            <div class="form-group">
                                <label for="clientName">客户名称</label>
                                <input type="text" class="form-control"
                                       id="clientName" name="clientName" value="${debt.clientName!''}"
                                       readonly/>
                            </div>
                        </div>
                        <div class="col-md-6 column">
                            <div class="form-group">
                                <label for="contact">联系人</label>
                                <input type="text" class="form-control"
                                       id="contact" value="${debt.contact!''}"
                                       readonly/>
                            </div>
                        </div>

                        <div class="col-md-6 column">
                            <div class="form-group">
                                <label for="contact">收欠款金额</label>
                                <input type="text" class="form-control"
                                       id="refund" name="refund" value=""
                                />
                            </div>
                        </div>

                        <div class="col-md-6 column">
                            <div class="form-group">
                                <label for="comment">备注</label>
                                <input type="text" class="form-control"
                                       id="comment" name="comment" value=""
                                />
                            </div>
                        </div>

                        <div class="col-sm-offset-6 col-sm-0 form-group">
                            <button type="submit" class="btn btn-success btn-block"
                            style="font-size: large;font-weight: bold">保存</button>
                        </div>
                        <div class="col-sm-offset-6 col-sm-0">
                            <button type="submit" class="btn btn-success btn-block"
                                    style="font-size: large;font-weight: bold"
                            onclick="history.back()">返回</button>
                        </div>
                    </form>

                    <div class="form-group">
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-default btn-block"
                                    value="" style="background-color: cornflowerblue;font-size: large"
                            >历史欠款</button>
                        </div>
                    </div>

                    <table class="table">
                        <thead>
                        <tr>
                            <th>单据编号</th>
                            <th>单据时间</th>
                            <th>欠款金额</th>
                            <th>经办人</th>
                            <th>备注</th>
                        </thead>
                        <tbody>
                        <#--                    c:forEach items='${pageInfo.list}'  var='trip'-->
                        <#list debtOrderList as order>
                            <tr class="info">
                                <td>${order.receiptNum!}</td>
                                <td>
                                              <#if  (order.operationDate??)>
                                                  ${order.operationDate?string('yyyy-MM-dd')}
                                              </#if>

                                    <#--                                ${trip.startDate?string('yyyy-MM-dd')time} 展示年月日时分秒-->
                                    <#--                                ${trip.startDate?time} 展示时分秒-->
                                </td>
                                <td>${order.owe!}</td>
                                <td>${order.operator!}</td>
                                <td>${order.comment!}</td>

                                <#--<td>-->
                                    <#--<img style="width: 100px;height: 100px;" src="${trip.tripPic}" />-->
                                <#--</td>-->
                            </tr>
                        </#list>

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <script src="/static/js/jquery-1.8.0.min.js" ></script>
        <script>

            // 页面加载完毕.
            // $(function(){
            //     $.getJSON(
            //         "/user/get-name",
            //         null,
            //         function(result){
            //             if(result.code == 0){
            //                 $("#name").html(result.data);
            //             }else{
            //                 location.href = "/user/login-ui";
            //             }
            //         }
            //     );
            // });


        </script>
    </body>
</html>